<?php 
class News_Model_Search extends Search_Model_Search 
{
	public $_index_fields = array('label', 'text');

	public $_section_name = 'Новости';
	
	public function __construct() {
		$this->_model = new News_Model_Item ();
	}
	
	public function getData() {
		$model = $this->_model;
		$res = $model->select()->setOrder('date desc')->getData("active=1");
		return $res;
	}
	
	public function getUrl($item) {
		return '/news/id/' . $item['id'];
	}
	
}